<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>StudentWorld</title>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<?php 

//nastavitev seje
session_start();

$streznik = $_SERVER["HTTP_HOST"];  
			
$pot = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");

if (isset($_SESSION['uporabnik'])) {
    header( "Location: http://".$streznik."".$pot."/prva.php" );
    exit;
}

 else if (!isset($_SESSION['uporabnik'])) {

?>

    <div id="wrapper">
    	<div id="header-wrapper">
        
    		<?php include_once("glava.php"); ?>
            
    	</div>
    	<!-- end #header -->
    	<div id="page">
    		<div id="page-bgtop">
    			<div id="page-bgbtm">
    				<div id="content">
    					<div class="post">
    						<h2 class="title">Dobrodošli pri StudentWorld</h2>
    						<div style="clear: both;">&nbsp;</div>
    						<div class="entry">
                                <p><a href="registracija.php">Še niste registrirani?</a></p>
    						</div>
    					</div>
    					
    					<div style="clear: both;">&nbsp;</div>
    				</div>
    				<!-- end #content -->
    				<div id="sidebar">
    					<ul>
    						<li>
                                
                                <?php
                                include_once "iskanje.php";

?>
    							<?php

                                    if(isset($_GET['napaka'])) {
                                        echo "<p>Napačna prijava</p>";
                                    }
                                    if(isset($_GET['status'])) {
                                        echo "<p>Lahko se prijavite, registracija uspešna</p>";
                                    }

?>
                                <h1>Prijava</h1>
                                <div id="search" >
                                    <form method="post" action="prijava.php">
                                        <div>
                                        <table>
                                            <tr>
                                                <td>Uporabnik:</td>
                                                <td><input type="text" name="upime" id="upime" value="" /></td>
                                            </tr>
                                            <tr>
                                                <td>Geslo:</td>
                                                <td><input type="password" name="geslo" id="geslo" value="" /></td>
                                            </tr>
                                        </table>
                                		<p><input type="submit" id="prijava" value="Prijava" /></p>

                                        </div>
                                	</form>
                                    
                                </div>
    							<div style="clear: both;">&nbsp;</div>
                                
    						</li>
    					</ul>
                        
    				</div>
                    
    				<!-- end #sidebar -->
    				<div style="clear: both;">&nbsp;</div>
    			</div>
    		</div>
    	</div>
    	<!-- end #page -->
    </div>
    <?php include_once("noga.php"); } ?>
    <!-- end #footer -->
</body>
</html>
